﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;

namespace FlexiCommerce.Configuration
{
    public class ComponentElement : ConfigurationElement
    {
        /// <summary>Class and name and assembly of the service interface, e.g. "MyNamespace.MyInterface, MyAssembly"</summary>
        [ConfigurationProperty("service")]
        public string Service
        {
            get { return (string)base["service"]; }
            set { base["service"] = value; }
        }

        /// <summary>Class and name and assembly of the implementation to add, e.g. "MyNamespace.MyClass, MyAssembly". If no service is defined the class itself will represent the service.</summary>
        [ConfigurationProperty("implementation", IsRequired = true)]
        public string Implementation
        {
            get { return (string)base["implementation"]; }
            set { base["implementation"] = value; }
        }
    }
}
